package com.hellowx.manager.service.impl;

import com.hellowx.common.utils.FtpUtils;
import com.hellowx.manager.service.UploadService;
import org.springframework.stereotype.Service;

import java.io.FileInputStream;

/**
 * Created by IntelliJ IDEA.
 *  图片上传服务
 * @author MagicMushroom
 * @date 2021/7/14
 */
@Service("uploadService")
public class UploadServiceImpl implements UploadService {

    /**
     *  上传图片
     * @param fileInputStream 文件流
     * @param name 图片名称
     */
    @Override
    public void uploadImage(FileInputStream fileInputStream, String name) throws Exception {
        FtpUtils.uploadImage(fileInputStream,name);
    }
}
